<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>店铺信息-{$tpshop_config['shop_info_store_title']}</title>
    <meta http-equiv="keywords" content="{$tpshop_config['shop_info_store_keyword']}" />
    <meta name="description" content="{$tpshop_config['shop_info_store_desc']}" />
    <link rel="stylesheet" href="__STATIC__/css/index.css" type="text/css">
    <script src="__STATIC__/js/jquery-1.10.2.min.js"></script>
    <script src="__STATIC__/js/slider.js"></script>
	<script src="__PUBLIC__/js/layer/layer.js"></script><!-- 弹窗js 参考文档 http://layer.layui.com/-->
</head>
<style type="text/css">
.wi80-BFB{width:80%}
.wi40-BFB{width:40%}
.seauii{ padding:7px 10px; margin-right:10px}
.he110{ height:110px}
.di-bl{ display:inherit}
</style>
<body>
<div class="adderss-add">
    <div class="ner-reac ol_box_4" style="visibility: visible; position: fixed; z-index: 500; width: 100%; height:100%">
        <div class="box-ct">
            <div class="box-header">
                <!-- <a href="" class="box-close"></a> -->
                <if condition="$goods[goods_id] neq ''">
                    <span class="box-title">修改店铺</span>
                    <else/>
                    <span class="box-title">添加店铺</span>
                </if>


            </div>
            <form action="" method="post" id="form1" onSubmit="return checkForm()">
                <input type="hidden" name="goods_id" value="{$goods[goods_id]}"/>
                <table width="90%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td align="right"><span class="xh">*</span>所属平台：&nbsp;</td>
                        <td>
                            <select class="di-bl fl seauii" name="goods_type" id="goods_type" onchange="sub_type();" style="width:30%">
                                <option value="0">请选择</option>
                                <volist name="type_list" id="v">
                                    <option    value="{$v.id}" <if condition="$goods[goods_type] eq $v['id']">selected</if>   >{$v.name}</option>
                                </volist>
                            </select>
                        </td>
                    </tr>



                    <tr>
                        <td align="right"><span class="xh">*</span>店铺名称 ：&nbsp;</td>
                        <td><input class="wi80-BFB" name="seller_name" type="text" value="{$goods.seller_name}" maxlength="12" /></td>
                    </tr>
                    <tr>
                        <td align="right" ><span class="xh">*</span> 店铺信息标题:&nbsp;</td>
                        <td>

                            <textarea rows="3" cols="80" name="seller_title">{$goods.seller_title} </textarea>
                        </td>
                    </tr>

                    <tr id="jd_show" style="display: none">
                        <td align="right"><span class="xh">*</span>注册类型 ：&nbsp;</td>
                        <td>
                            <select class="di-bl fl seauii" name="seller_type" id="seller_type"    style="width:30%">
                                <option value="0">请选择</option>
                                <option <if condition="$goods[goods_type_name] eq '京东（个人身份证）'">selected</if> value="京东（个人身份证）">个人身份证</option>
                                <option  <if condition="$goods[goods_type_name] eq '京东（企业营业执照）'">selected</if> value="京东（企业营业执照）">企业营业执照</option>
                                <option  <if condition="$goods[goods_type_name] eq '京东（个体营业执照）'">selected</if> value="京东（个体营业执照）">京东（个体营业执照）</option>
                            </select>
                        </td>

                    </tr>
                    <tr id="qt_show" style="display: none">
                        <td align="right"><span class="xh">*</span>店铺类型 ：&nbsp;</td>
                        <td>
                            <select class="di-bl fl seauii" name="seller_type1" id="seller_type1"    style="width:30%">
                                <option value="0">请选择</option>
                                <option <if condition="$goods[goods_type_name] eq '旗舰店'">selected</if> value="旗舰店">旗舰店</option>
                                <option <if condition="$goods[goods_type_name] eq '专营店'">selected</if> value="专营店">专营店</option>
                                <option <if condition="$goods[goods_type_name] eq '专营店'">selected</if> value="专卖店">专卖店</option>
                            </select>
                        </td>
                    </tr>


                    <tr>
                        <td align="right"><span class="xh">*</span>网店地址 ：&nbsp;</td>
                        <td><input class="wi80-BFB" name="seller_link" id="seller_link" type="text" value="{$goods.seller_link}" maxlength="12" /></td>
                    </tr>

                    <tr>
                        <td align="right"><span class="xh">*</span>开店时间 ：&nbsp;</td>
                        <td><input class="wi80-BFB" name="start_time" type="text" value="{$goods.start_time}" maxlength="12" /></td>
                    </tr>
                    <tr>
                        <td align="right"><span class="xh">*</span>所在地区：&nbsp;</td>
                        <td>
                            <select class="di-bl fl seauii" name="province" id="province" onChange="get_city(this)">
                                <option value="0">请选择省份</option>
                                <volist name="province" id="p">
                                    <option <if condition="$goods['province'] eq $p['id']">selected</if>  value="{$p.id}">{$p.name}</option>
                                </volist>
                            </select>
                            <select class="di-bl fl seauii" name="city" id="city"  >
                                <option  value="0">请选择城市</option>
                                <volist name="city" id="p">
                                    <option <if condition="$goods['city'] eq $p['id']">selected</if>  value="{$p.id}">{$p.name}</option>
                                </volist>
                            </select>

                            <br>
                        </td>
                    </tr>


                    <tr>
                        <td align="right"><span class="xh">*</span>暂定售价 ：&nbsp;</td>
                        <td><input class="wi80-BFB" name="ys_price" type="text" value="{$goods.ys_price}"   /></td>
                    </tr>
                    <tr>
                        <td align="right"><span class="xh">*</span>保证金 ：&nbsp;</td>
                        <td><input class="wi80-BFB" name="b_price" type="text" value="{$goods.b_price}"   /></td>
                    </tr>
                    <tr>
                        <td align="right"><span class="xh">*</span>技术年费 ：&nbsp;</td>
                        <td><input class="wi80-BFB" name="j_price" type="text" value="{$goods.j_price}"   /></td>
                    </tr>

                    <tr>
                        <td align="right"> 公司名称 ：&nbsp;</td>
                        <td><input class="wi80-BFB" name="company_name" type="text" value="{$goods.company_name}" maxlength="12" /></td>
                    </tr>

                    <tr>
                        <td align="right"> 公司注册资金 ：&nbsp;</td>
                        <td><input class="wi80-BFB" name="reg_money" type="text" value="{$goods.reg_money}" maxlength="12" /></td>
                    </tr>

                    <tr>
                        <td align="right">店铺详细描述:&nbsp;</td>
                        <td>
                            <textarea rows="5" cols="80" name="seller_describe">{$goods.seller_describe}</textarea>
                        </td>
                    </tr>


                    <tr>
                        <td align="right"><span class="xh">*</span>经营状态:</td>
                        <td>
                            正常:<input type="radio" <if condition="$goods['jy_status'] eq 0">checked="checked" </if>   value="0" name="jy_status" />
                            异常:<input type="radio" <if condition="$goods['jy_status'] eq 1">checked="checked" </if>  value="1" name="jy_status" />
                        </td>
                    </tr>
                    <tr>
                        <td align="right"><span class="xh">*</span>税务状态:</td>
                        <td>
                            正常:<input type="radio"  <if condition="$goods['cw_status'] eq 0">checked="checked" </if>    value="0" name="cw_status" />
                            不正常:<input type="radio" <if condition="$goods['cw_status'] eq 1">checked="checked" </if>  value="1" name="cw_status" />
                        </td>
                    </tr>
                    <tr>
                        <td align="right"> </td>
                        <td>
                            <button   type="button" id="but1" onclick="$('#form1').submit();">提交</button>
                        </td>
                    </tr>



                </table>
                <div>

                </div>

            </form>
        </div>
    </div>
</div>
<script src="__PUBLIC__/js/global.js"></script>
<script src="__PUBLIC__/js/pc_common.js"></script>
<script>

    $(document).ready(function(){
        var goods_type =$('#goods_type').val()
        if(goods_type==5){
            $('#jd_show').show();
            $('#qt_show').hide();
        }else{
            $('#qt_show').show();
            $('#jd_show').hide();
        }

    });




    function sub_type(){
        var type_id =$('#goods_type').val();
        if(type_id==5){
            $('#jd_show').show();
            $('#qt_show').hide();
        }else{
            $('#qt_show').show();
            $('#jd_show').hide();
        }
    }


    function checkForm(){

        var goods_type = $('#goods_type').val();
        var seller_name = $('input[name="seller_name"]').val();
        var seller_type = $('#seller_type').val();
        var seller_type1 = $('#seller_type1').val();
        var seller_link = $('input[name="seller_link"]').val();
        var start_time = $('input[name="start_time"]').val();
        var city = $('#city').val();
        var ys_price = $('input[name="ys_price"]').val();
        var b_price = $('input[name="b_price"]').val();
        var j_price = $('input[name="j_price"]').val();
        var error = '';
        if(goods_type == 0){
            error += '请选择所属平台<br/>';
        }
        if(seller_name==0){
            error += '请填写店铺名称 <br/>';
        }
        if(seller_type==0&&seller_type1==0){
            error += '请选择店铺类型 <br/>';
        }
        if(seller_link==0){
            error += '请填写店铺线上地址<br/>';
        }
        if(start_time == ''){
            error += '请填写开店时间 <br/>';
        }
        if(city == 0){
            error += '请选择城市 <br/>';
        }
        if(ys_price == ''){
            error += '请填写预售价格 <br/>';
        }
        if(b_price == ''){
            error += '请填写保证金价格 <br/>';
        }
        if(j_price == ''){
            error += '请填写技术年费价格 <br/>';
        }

        if(error){
			layer.alert(error, {icon: 2});
            return false;
        }
        return true;
    }
</script>
</body>
</html>
